<?php
defined('_VISIT_URL_') or exit('No direct script access allowed');

class record {

	//提交搜索关键词
	public function submitSearchKeyword() {
		if (empty(getPost('keyword')) || valid::isWicked(getPost('keyword'))) {
			return util::getValidError('关键词格式异常');
		}

		if (empty(getPost('sortation')) || valid::isWicked(getPost('sortation'))) {
			return util::getValidError('栏目分类格式异常');
		}

		$rst = new sqlcon();
		$uuid = util::getUUID();

		$rst->addCollect('searchid', $uuid);
		$rst->addCollect('keyword', getPost('keyword'));
		$rst->addCollect('sortation', getPost('sortation'));
		$rst->addCollect('searchtime', date('Y-m-d H:i:s'));
		$rst->insertInfo('search');

		return util::getSuccess('success');
	}

}